<?php

use yii\db\Migration;
use yii\db\Schema;

class m170818_005848_add_field_type extends Migration
{
    public function up()
    {
        $this->addColumn('{{invoice}}', 'type', Schema::TYPE_INTEGER. "(1) DEFAULT 1 COMMENT '1收款 2应收账款 3退款' ");

    }

    public function down()
    {
        echo "m170818_005848_add_field_type cannot be reverted.\n";

        return false;
    }

    /*
    // Use safeUp/safeDown to run migration code within a transaction
    public function safeUp()
    {
    }

    public function safeDown()
    {
    }
    */
}
